home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2b.lha / p4-1.2b / servers / README < prev    next >
Text File  |  1992-10-19  |  4KB  |  140 lines

  1. This directory contains code for two servers, a secure server and one
  2. that is not secure.  We recommend that you use only the secure server,
  3. we use the other one only for testing. 
  4.  
  5. This secure server can be installed for use public use, i.e. all
  6. users can use the same copy, or you can make it available such that
  7. individual users can start it up as they need it.  Each method has
  8. its won advantages/disadvantages.
  9.  
  10. Secure server installation for public use
  11. -----------------------------------------
  12.  
  13. The following steps are done as a non-root user, to install the
  14. server.  We assume that it has been made as part of the top-level
  15. p4 installation.
  16.  
  17.  
  18. 1. Decide in which directory the server will live. By default it
  19. goes into /etc. There will be two files in that directory: serv_p4
  20. (the server), and serv_p4.log (a logfile created by serv_p4). This
  21. will be the SERVER_HOME directory.
  22.  
  23. 2. Edit Makefile to reflect the correct value for SERVER_HOME.
  24.  
  25. The values for P4_PORT and P4_PORT_NAME should not need to be changed.
  26.  
  27. 3. Do a "make all". 
  28.  
  29. As root:
  30.  
  31. 4. Add an entry to /etc/services. The contents of services.entry
  32. should work.
  33.  
  34. If you are on a NIS/YellowPages network, this step need only be done
  35. on the NIS server machine. After making the change, cd to the NIS
  36. directory (usually /var/yp) and do a "make".
  37.  
  38. 5. Add an entry to /etc/inetd.conf for the server. See the manual page
  39. for inetd(8) for the correct syntax. One of the examples in
  40. inetd.entry is probably correct for your system. 
  41.  
  42. Ensure that the server will be run as root.
  43.  
  44. Ensure that the pathname in /etc/inetd.conf points to the correct place.
  45.  
  46. 6. Make inetd aware of the new entry. On newer Unices, you should be
  47. able to do a "kill -HUP <inetd process id>". If that does not work,
  48. kill ("kill <inetd process id") and restart ("/etc/inetd &") inetd. If
  49. all else fails, reboot the machine.
  50.  
  51. 7. Do a "make install". This will copy serv_p4 to
  52. the SERVER_HOME directory.
  53.  
  54. --------------------------------------------------
  55.  
  56. The P4 secure server should now be available. If you have problems,
  57. first try to telnet directly to the server:
  58.     
  59.     % telnet <machine> serv_p4
  60.  
  61. If you get the error 
  62.  
  63.     serv_p4: bad port number
  64.  
  65. the /etc/services entry is incorrect. Did you do a make in /var/yp on
  66. a NIS system?
  67.  
  68. If you get the error
  69.  
  70.     telnet: connect: Connection refused
  71.  
  72. inetd probably didn't get restarted correctly, or there is a syntax
  73. error in the /etc/inetd.conf file. 
  74.  
  75.  
  76.  
  77.  
  78. Installing the server for private use
  79. -------------------------------------
  80.  
  81. Merely make the server in a directory where all users can execute it,
  82. and then note the following:
  83.  
  84.  
  85. The server has several options (I didn't explain these earlier).
  86.  
  87.     o   -d says to run in "daemon" mode. This is as opposed to
  88.         "inetd" mode: it will loop accepting connections itself,
  89.         instead of expecting fd 0 to be the net connection.
  90.  
  91.     o   "-p port" says to listen on port, instead of the default port.
  92.         If port is set to 0, the server will pick a port and print
  93.         its value to stdout.
  94.  
  95.     o   "-l logfile" sets the logfile.
  96.  
  97.     o   "-D" says run in debug mode. By default, in daemon mode the
  98.         server will fork and disconnect itself from the terminal. The
  99.        -D flag disables this.
  100.  
  101. If a non-root user runs the server, it will only run processes for that
  102. user. It will also assume "-p 0" and "-D" and set the default logfile
  103. to "P4Server.log.<pid>". 
  104.  
  105.  
  106.  
  107.  
  108. Using P4 with the server
  109. ------------------------
  110.  
  111. In order for the server to execute a slave process, several
  112. requirements must be met. 
  113.  
  114.     o    The name of the executable must be supplied as a full pathname
  115.         in the procgroup file
  116.  
  117.     o    A file called .p4apps must exist in the home directory of the
  118.     user under whose account the process will be run. The .p4apps
  119.     file contains a list of filenames for executable p4 slaves,
  120.     one per line. An executable must be listed in this file for
  121.     the server to execute it.
  122.  
  123.     For example, if the procgroup file entry is
  124.  
  125.         remote 1 /usr/user/sr_slave ruser
  126.     
  127.     the file ~ruser/.p4apps must exist on the machine called
  128.     "remote" and contain the line
  129.  
  130.         /usr/user/sr_slave
  131.  
  132.         In the file .p4apps blank lines and lines starting with '#'
  133.         are ignored.
  134.  
  135.  
  136. The server will require the user to supply a password if the proper
  137. /etc/hosts.equiv or ~user/.rhosts files do not have the appropriate
  138. entries. In other words, if rlogin requires a password, so will the P4
  139. server.
  140.